﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zocono.WCS.Domain.EntityInfo;
using Zocono.WCS.Domain.ScWorkModelDomain;
using Zocono.WCS.Infrastructure.ApllicationDto.DtoWcsManage;

namespace Zocono.WCS.Application.AppConfigureManage
{
    public class ScWorkModelApp
    {
        public IScWorkModelService _IScWorkModelService;
        public ScWorkModelApp(IScWorkModelService iScWorkModelService)
        {
            _IScWorkModelService = iScWorkModelService;
        }

        public async Task<List<ScWorkModelInfo>> GetScWorkModelInfo()
        {
            return await _IScWorkModelService.GetScWorkModelInfo();
        }

        public async Task<List<ScWorkModelInfoDto>> GetScWorkModelInfoDto()
        {
            return await _IScWorkModelService.GetScWorkModelInfoDto();
        }

        public async Task<bool> UpdateScWorkModelInfo(ScWorkModelInfoDto scWorkModelInfoDto)
        {
            return await _IScWorkModelService.UpdateScWorkModelInfo(scWorkModelInfoDto);
        }

        public async Task<ScWorkModelInfoDto> GetScWorkModelInfoById(long id)
        {
            return await _IScWorkModelService.GetScWorkModelByIdAsync(id);
        }

        public async Task<bool> CreateScWorkModelInfoAsync(ScWorkModelInfoDto scWorkModelInfoDto)
        {
            return await _IScWorkModelService.CreateScWorkModelInfoAsync(scWorkModelInfoDto);
        }

        /// <summary>
        /// 根据ID删除数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<bool> DeleteScWorkModelInfoByIdAsync(long id)
        {
            return await _IScWorkModelService.DeleteScWorkModelInfoByIdAsync(id);
        }

    }
}
